home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / konstruk / piccorr.sty < prev    next >
Text File  |  1994-01-13  |  2KB  |  44 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %                                                 %
  3. % Correction to PiCTeX 1.1 9/21/87                %
  4. % by Andreas Schrell, Wuppertal, FRG, 9/30/91     %
  5. %                                                 %
  6. % The bug forces wrong height and position of the %
  7. % vertical \betweenarrows - structure if the      %
  8. % coordinate difference is negative.              %
  9. % You can search for ERROR in this file.          %
  10. %                                                 %
  11. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  12.  
  13. {\catcode`!=11
  14.  
  15. \global
  16. \def\betweenarrows #1#2 from #3 #4 to #5 #6 {%
  17.   \!xloc=\!M{#3}\!xunit  \!xxloc=\!M{#5}\!xunit%
  18.   \!yloc=\!M{#4}\!yunit  \!yyloc=\!M{#6}\!yunit%
  19.   \!dxpos=\!xxloc  \advance\!dxpos by -\!xloc
  20.   \!dypos=\!yyloc  \advance\!dypos by -\!yloc
  21.   \advance\!xloc .5\!dxpos
  22.   \advance\!yloc .5\!dypos
  23. %
  24.   \let\!MBA=\!M%           ** save current coord\dimen mode
  25.   \!setdimenmode%          ** express locations in dimens
  26.   \ifdim\!dypos=\!zpt
  27.     \ifdim\!dxpos<\!zpt \!dxpos=-\!dxpos \fi
  28.     \put {\!lrarrows{\!dxpos}{#1}}#2{} at {\!xloc} {\!yloc}
  29.   \else
  30.     \ifdim\!dxpos=\!zpt
  31. %     \ifdim\!dypos<\!zpt \!dypos=-\!zpt \fi
  32. %                                  ^^^^^ ERROR!
  33.       \ifdim\!dypos<\!zpt \!dypos=-\!dypos \fi
  34. %                                  ^^^^^^^ CORRECTION!
  35.       \put {\!udarrows{\!dypos}{#1}}#2{} at {\!xloc} {\!yloc}
  36.     \fi
  37.   \fi
  38.   \let\!M=\!MBA%           ** restore previous c/d mode
  39.   \ignorespaces}
  40. }
  41.  
  42. \endinput
  43.  
  44.